﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.RightsManagement;
using System.Text;
using System.Threading.Tasks;
using WPF_RoleManager_Demo.Models;

namespace WPF_RoleManager_Demo.Service
{
    public class AuthService
    {
        public User Login(string username, string password)
        {
            if (username == "admin" && password == "123456")
            {
                return new User { Username = "admin", Role = UserRole.Admin };
            }
            else if (username == "user" && password == "123456")
            {
                return new User { Username = "user", Role = UserRole.User };
            }
            else
            {
                return null;
            }
        }
    }
}
